<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link href="themes/bootstrap/easyui.css" rel="stylesheet">
<link href="themes/icon.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="js/easyui-lang-zh_CN.js"></script>
<title>用户登录</title>
</head>
<script type="text/javascript">
	$(function() {
		$("#submitform").click(function() {
			$("#login").form('submit', {
				url : 'login',
				success : function(data) {
					if (data != '0') {
						location.href = "showMain";
					} else {
						$.messager.confirm('提示', '无此用户,重新登陆', function(r) {
							if (r) {
								$("#login").form('clear');
							}
						});
					}
				}
			})
		});
		$("#clearform").click(function(){
			$("#login").form('clear');
		})
	})
	//配置表单提交事件
	function submitForm() {
		$("#login").form('submit');
	}
	//配置表单清空内容事件
	function clearForm() {
		$("#login").form('clear');
	}
</script>
<body>
	<div id="win" class="easyui-window" title="公司人事管理登陆"
		style="width: 600px; height: 400px"
		data-options="iconCls:'icon-man',modal:true,closable:false,maximizable:false,minimizable:false">
		<div class="easyui-panel" style="text-align: center;"
			data-options="fit:true">
			<form id="login" method="post" style="margin-top: 100px">
				<div style="margin-bottom: 20px">
					<input class="easyui-textbox" name="enumber"
						data-options="iconCls:'icon-man',prompt:'请输入用户名',required: true,missingMessage:'用户名必填'"
						style="width: 200px">
				</div>
				<div style="margin-bottom: 20px">
					<input class="easyui-textbox" type="password" name="epassword"
						data-options="iconCls:'icon-lock1',prompt:'请输入密码'"
						style="width: 200px">
				</div>
			</form>
			<div style="text-align: center; padding: 5px 0">
				<a href="javascript:void(0)" class="easyui-linkbutton"
					id="submitform" style="width: 80px" data-options="text:'提交'"></a> <a
					href="javascript:void(0)" class="easyui-linkbutton" id="clearform"
					style="width: 80px" data-options="text:'清空'"></a>
			</div>
		</div>
	</div>

</body>
</html>